package com.lnn.springBase.model;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;

@Data
public  class UserDTO {

    @NotEmpty(message  =  "登录账号不能为空")
    @Length(min  =  4,  max  =  16,  message  =  "账号长度为  4-16  位")
    @Pattern(regexp  =  "^[A-Za-z0-9]+$",  message  =  "账号格式为数字以及字母")
    private  String  account;

    @NotEmpty(message  =  "密码不能为空")
    @Length(min  =  4,  max  =  16,  message  =  "密码长度为  4-16  位")
    private  String  password;

    @NotEmpty(message = "{name.empty.error}")
    private String name ;

    @NotEmpty(message = "{address.empty.error}")
    private String address ;

    @Email
    private  String  email;


}
